package com.lsp.rabbitmqcousumer.direct;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RabbitListener(
        bindings = @QueueBinding(
                value = @Queue(
                        value = "TestFanoutQueue3"
                ),
                exchange = @Exchange(
                        value = "TestFanoutExchange", type = ExchangeTypes.FANOUT))
)
public class FanoutReceiver3 {
    @RabbitHandler(isDefault = true)
    public void process(Map testMessage){
        System.out.println("FanoutReceiver3消费者收到消息：" + testMessage.toString());
    }
}
